<template>
	<view class="goodsshop_box">
		<view class="goodsshop_item" v-for="item in hotshop" :key="item.id" @click="goxqy(item)">
			<view class="img">
				<image :src="item.small_image"></image>
			</view>
			<view class="price">
				<text>￥{{item.price}}</text>
				<text>￥{{item.origin_price}}</text>
			</view>
			<view class="name">{{item.product_name}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		props:['hotshop'],
		methods:{
			goxqy(item){
				this.$emit("goxqy",item)
			}
		}
	}
</script>

<style lang="scss">
	.goodsshop_box {
		display: flex;
		padding: 0 10rpx;
		box-sizing: border-box;
		flex-wrap: wrap;
		justify-content: space-between;

		.goodsshop_item {
			// flex: 1;				
			margin: 10rpx;
			width: 345rpx;
			background-color: #fff;

			.img {

				image {
					width: 345rpx;
					height: 345rpx;
				}
			}

			.price {
				margin: 20rpx 0;
				padding: 10rpx;
				color: #d81e06;
				font-size: 36rpx;

				text:nth-child(2) {
					color: #ccc;
					font-size: 28rpx;
					margin-left: 20rpx;
					text-decoration: line-through;
				}

			}

			.name {
				padding: 0 20rpx 40rpx 20rpx;
			}
		}
	}
</style>
